<template>
  <div class="goodsIntroduce">
    <h1>{{ info.title }}</h1>
    <hr>
    <div class="content" v-html="info.content"></div>
  </div>
</template>
<script>
export default {
  created() {
    this.getData();
  },
  data() {
    return {
      info: {},
      id: this.$route.params.id
    };
  },
  methods: {
    getData() {
      this.$http.get("api/goods/getdesc/" + this.id).then(data => {
        console.log(data.body.message);
        this.info = data.body.message[0];
      });
    }
  }
};
</script>
<style lang="scss">
.goodsIntroduce {
    padding: 4px;
  h1 {
    font-size: 16px;
    text-align: center;
    color: #26a2ff;
    margin: 15px 0;
  }
  .content {
    img {
      width: 100%;
    }
  }
}
</style>
